package com.example.demo.common;

import lombok.Data;

@Data
public class PageParam {

    /**
     * 页大小
     */
    private long size;

    /**
     * 当前页(第一页为1)
     */
    private long current;
    public long getOffset(){
        if (this.current - 1 < 0) {
            return 0;
        }
        return (this.current - 1) * this.size;
    }

}
